class A {
    constructor(value) {
        this.value = value;
    }
    valueOf() {
        this.value++;
        return this.value;
    }
    toString() {
        
        return '哈哈';
    }
}

const a = new A(0);

console.log(a == 1 && a == 2 && a == 3);